<template>
  <div>
    <el-select size="mini" placeholder="全部"
      clearable
      v-model="value">
      <el-option
        v-for="item in options"
        :key="item.value"
        :label="item.label"
        :value="item.value">
      </el-option>
    </el-select>
  </div>
</template>

<script>
import { mapState, mapMutations } from 'vuex';
export default {
  name:'crmSelect-fengkong',
  computed:{
    ...mapState([
      'paramsResetFlag',
      'postParams'
    ]),
  },
  watch:{
    paramsResetFlag:function(nv,ov){//监听复位标识
      this.value.splice(0,this.value.length);//本体数据复位
      // this.updata2Store();//通知$store数据修改
    },
  },
  props:{},
  data(){
    return {
      isDev: process.env.NODE_ENV == 'development',
      value:'',
      options: [
        {label:'黑',value:1},
        {label:'深红',value:2},
        {label:'红',value:3},
        {label:'橙',value:4},
        {label:'紫',value:5},
        {label:'解除',value:99},
      ]
    }
  },
  methods:{
    handleChange:function(value){
      let sp = this.postParams.SPVALUE;
      if(value.includes(sp)){
        this.value.splice(0,this.value.length,sp)
      }
      // this.updata2Store()
    },
    updata2Store:function(){
      // this.$store.commit('postParams/setSelfTag',{
      //   pid:this.parent.pid,
      //   arr:this.$_.cloneDeep(this.value)
      // })
    },
  }
}
</script>

<style lang="less" scoped></style>